```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>企业级RocketMQ部署架构指南</title>
    <link href="https://cdn.staticfile.org/font-awesome/6.4.0/css/all.min.css" rel="stylesheet">
    <link href="https://cdn.staticfile.org/tailwindcss/2.2.19/tailwind.min.css" rel="stylesheet">
    <link href="https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@400;500;600;700&family=Noto+Sans+SC:wght@300;400;500;700&display=swap" rel="stylesheet">
    <style>
        body {
            font-family: 'Noto Sans SC', Tahoma, Arial, Roboto, "Droid Sans", "Helvetica Neue", "Droid Sans Fallback", "Heiti SC", "Hiragino Sans GB", Simsun, sans-serif;
            color: #333;
            line-height: 1.6;
        }
        .hero {
            background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
        }
        .title-text {
            font-family: 'Noto Serif SC', serif;
        }
        .card-hover:hover {
            transform: translateY(-5px);
            box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
        }
        .section-divider {
            height: 2px;
            background: linear-gradient(90deg, transparent, rgba(66, 153, 225, 0.5), transparent);
        }
        .code-block {
            background-color: #f6f8fa;
            border-radius: 6px;
            padding: 16px;
            font-family: monospace;
        }
        .flow-arrow {
            animation: flow 2s ease-in-out infinite;
        }
        @keyframes flow {
            0%, 100% { transform: translateX(0); }
            50% { transform: translateX(10px); }
        }
        .icon-highlight {
            color: #4299e1;
        }
    </style>
</head>
<body class="bg-gray-50">
    <!-- Hero Section -->
    <section class="hero text-white py-20 px-4 md:px-0">
        <div class="container mx-auto max-w-5xl flex flex-col items-center text-center">
            <h1 class="title-text text-4xl md:text-5xl font-bold mb-6 leading-tight">企业级RocketMQ部署架构</h1>
            <p class="text-xl md:text-2xl max-w-3xl mb-8 opacity-90">构建高可用、高性能、高可靠的分布式消息系统</p>
            <div class="flex space-x-4">
                <a href="#core-components" class="px-6 py-3 bg-white text-blue-700 font-medium rounded-lg hover:bg-gray-100 transition duration-300">
                    <i class="fas fa-cubes mr-2"></i>核心组件
                </a>
                <a href="#ha-solutions" class="px-6 py-3 bg-blue-600 hover:bg-blue-700 font-medium rounded-lg transition duration-300">
                    <i class="fas fa-shield-alt mr-2"></i>高可用方案
                </a>
            </div>
        </div>
    </section>

    <!-- Content Container -->
    <div class="container mx-auto max-w-5xl px-4 py-12">
        <!-- Introduction -->
        <section class="mb-16">
            <p class="text-lg text-gray-700 mb-8 leading-relaxed">
                企业级RocketMQ部署架构通常采用多机房、多集群的方式，以满足高可用、高性能和容灾的需求。一个完整的企业级RocketMQ部署架构需要考虑核心组件设计、高可用容灾方案以及性能优化监控等多个方面。
            </p>
            <div class="bg-blue-50 border-l-4 border-blue-500 p-4 rounded-r-lg">
                <div class="flex">
                    <div class="flex-shrink-0">
                        <i class="fas fa-info-circle text-blue-500 text-xl mt-1"></i>
                    </div>
                    <div class="ml-3">
                        <p class="text-sm text-blue-700">
                            RocketMQ是阿里巴巴开源的一款分布式消息中间件，具有高性能、高可靠、高实时、分布式等特点，广泛应用于企业级系统中。
                        </p>
                    </div>
                </div>
            </div>
        </section>

        <!-- Core Components Section -->
        <section id="core-components" class="mb-20">
            <h2 class="title-text text-3xl font-bold mb-8 flex items-center">
                <span class="w-2 h-8 bg-blue-600 mr-4"></span>
                <span>核心组件</span>
            </h2>
            
            <div class="grid md:grid-cols-2 gap-8 mb-12">
                <!-- NameServer Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden transition duration-300 card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-3 rounded-full mr-4">
                                <i class="fas fa-search icon-highlight text-xl"></i>
                            </div>
                            <h3 class="title-text text-xl font-bold">NameServer集群</h3>
                        </div>
                        <ul class="space-y-2 text-gray-700">
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>负责服务发现和路由功能</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>通常部署多个节点，分布在不同机房</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>各节点之间相互独立，无状态设计，便于水平扩展</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <!-- Broker Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden transition duration-300 card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-3 rounded-full mr-4">
                                <i class="fas fa-database icon-highlight text-xl"></i>
                            </div>
                            <h3 class="title-text text-xl font-bold">Broker集群</h3>
                        </div>
                        <ul class="space-y-2 text-gray-700">
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>负责消息存储和传输</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>采用主从架构，每个Broker主节点配备一个或多个从节点</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>主从节点分布在不同机房，实现跨机房容灾</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <!-- Producer Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden transition duration-300 card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-3 rounded-full mr-4">
                                <i class="fas fa-paper-plane icon-highlight text-xl"></i>
                            </div>
                            <h3 class="title-text text-xl font-bold">Producer集群</h3>
                        </div>
                        <ul class="space-y-2 text-gray-700">
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>消息生产者，通常集成在业务系统中</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>支持多种负载均衡策略</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>具备消息重试和故障转移能力</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <!-- Consumer Card -->
                <div class="bg-white rounded-xl shadow-md overflow-hidden transition duration-300 card-hover">
                    <div class="p-6">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-3 rounded-full mr-4">
                                <i class="fas fa-inbox icon-highlight text-xl"></i>
                            </div>
                            <h3 class="title-text text-xl font-bold">Consumer集群</h3>
                        </div>
                        <ul class="space-y-2 text-gray-700">
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>消息消费者，负责处理业务逻辑</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>支持集群消费和广播消费两种模式</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                <span>具备消息重试和并发处理能力</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            
            <!-- Architecture Diagram -->
            <div class="bg-white rounded-xl shadow-md p-6 mb-8">
                <h3 class="title-text text-xl font-bold mb-4 flex items-center">
                    <i class="fas fa-project-diagram text-blue-500 mr-2"></i>
                    RocketMQ架构示意图
                </h3>
                <div class="mermaid">
                    graph TD
                        P[Producer集群] -->|注册/发现| N[NameServer集群]
                        C[Consumer集群] -->|注册/发现| N
                        P -->|发送消息| B[Broker主节点]
                        B -->|消息复制| S[Broker从节点]
                        C -->|消费消息| B
                        C -->|消费消息| S
                </div>
                <div class="mt-4 text-sm text-gray-500">
                    <i class="fas fa-info-circle mr-1"></i> 此图展示了RocketMQ各组件间的交互关系
                </div>
            </div>
            
            <!-- Deployment Topology -->
            <h3 class="title-text text-2xl font-bold mb-6 mt-12">部署拓扑</h3>
            
            <div class="grid md:grid-cols-3 gap-6 mb-8">
                <!-- Single Cluster -->
                <div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden transition duration-300 hover:shadow-md">
                    <div class="p-5">
                        <h4 class="title-text font-bold text-lg mb-3 flex items-center">
                            <i class="fas fa-server text-blue-500 mr-2"></i>
                            单集群多副本部署
                        </h4>
                        <ul class="space-y-2 text-gray-700 text-sm">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>适用于中小型企业</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>一个RocketMQ集群，每个Broker配置主从节点</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>NameServer部署2-4个节点</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <!-- Multi-Cluster -->
                <div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden transition duration-300 hover:shadow-md">
                    <div class="p-5">
                        <h4 class="title-text font-bold text-lg mb-3 flex items-center">
                            <i class="fas fa-globe-americas text-blue-500 mr-2"></i>
                            多集群异地多活部署
                        </h4>
                        <ul class="space-y-2 text-gray-700 text-sm">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>适用于大型企业和关键业务系统</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>在不同地域部署多个RocketMQ集群</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>通过消息复制实现跨集群数据同步</span>
                            </li>
                        </ul>
                    </div>
                </div>
                
                <!-- Hybrid Cloud -->
                <div class="bg-white rounded-lg shadow-sm border border-gray-200 overflow-hidden transition duration-300 hover:shadow-md">
                    <div class="p-5">
                        <h4 class="title-text font-bold text-lg mb-3 flex items-center">
                            <i class="fas fa-cloud text-blue-500 mr-2"></i>
                            混合云部署
                        </h4>
                        <ul class="space-y-2 text-gray-700 text-sm">
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>结合公有云和私有云资源</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>核心业务数据存储在私有云</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check-circle text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>非核心业务或峰值流量处理在公有云</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
        </section>

        <!-- Divider -->
        <div class="section-divider my-12"></div>

        <!-- HA Solutions Section -->
        <section id="ha-solutions" class="mb-20">
            <h2 class="title-text text-3xl font-bold mb-8 flex items-center">
                <span class="w-2 h-8 bg-blue-600 mr-4"></span>
                <span>高可用和容灾方案</span>
            </h2>
            
            <!-- HA Design -->
            <div class="mb-12">
                <h3 class="title-text text-2xl font-bold mb-6 flex items-center">
                    <i class="fas fa-shield-alt text-blue-500 mr-2"></i>
                    <span>高可用设计</span>
                </h3>
                
                <div class="grid md:grid-cols-3 gap-6 mb-8">
                    <!-- Multi-Replica -->
                    <div class="bg-white rounded-lg shadow-sm p-6 border border-gray-200 transition duration-300 hover:shadow-md">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-2 rounded-lg mr-4">
                                <i class="fas fa-copy text-blue-600"></i>
                            </div>
                            <h4 class="title-text font-bold">多副本机制</h4>
                        </div>
                        <div class="text-gray-700 text-sm">
                            <p class="mb-2">Broker采用主从架构，实现数据多副本存储</p>
                            <p class="mb-2">支持同步复制和异步复制两种方式</p>
                            <p>同步复制保证数据一致性，异步复制提高性能</p>
                        </div>
                    </div>
                    
                    <!-- Failover -->
                    <div class="bg-white rounded-lg shadow-sm p-6 border border-gray-200 transition duration-300 hover:shadow-md">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-2 rounded-lg mr-4">
                                <i class="fas fa-random text-blue-600"></i>
                            </div>
                            <h4 class="title-text font-bold">自动故障转移</h4>
                        </div>
                        <div class="text-gray-700 text-sm">
                            <p class="mb-2">通过Dledger组件实现自动主从切换</p>
                            <p class="mb-2">当主节点故障时，从节点自动升级为主节点</p>
                            <p>客户端自动感知主从变化，无需人工干预</p>
                        </div>
                    </div>
                    
                    <!-- Load Balance -->
                    <div class="bg-white rounded-lg shadow-sm p-6 border border-gray-200 transition duration-300 hover:shadow-md">
                        <div class="flex items-center mb-4">
                            <div class="bg-blue-100 p-2 rounded-lg mr-4">
                                <i class="fas fa-balance-scale text-blue-600"></i>
                            </div>
                            <h4 class="title-text font-bold">负载均衡</h4>
                        </div>
                        <div class="text-gray-700 text-sm">
                            <p class="mb-2">Producer端支持多种消息路由策略</p>
                            <p class="mb-2">Consumer端支持负载均衡消费</p>
                            <p>动态调整队列分配，避免消费倾斜</p>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Disaster Recovery -->
            <div class="mb-12">
                <h3 class="title-text text-2xl font-bold mb-6 flex items-center">
                    <i class="fas fa-fire-extinguisher text-blue-500 mr-2"></i>
                    <span>容灾方案</span>
                </h3>
                
                <div class="grid md:grid-cols-2 gap-8">
                    <!-- Same City Active-Active -->
                    <div class="bg-white rounded-xl shadow-md overflow-hidden transition duration-300 card-hover">
                        <div class="p-6">
                            <div class="flex items-center mb-4">
                                <div class="bg-blue-100 p-3 rounded-full mr-4">
                                    <i class="fas fa-city text-blue-600"></i>
                                </div>
                                <h4 class="title-text text-lg font-bold">同城双活</h4>
                            </div>
                            <ul class="space-y-2 text-gray-700">
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                    <span>在同一城市的不同机房部署RocketMQ集群</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                    <span>主从节点分布在不同机房</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                    <span>任一机房故障，另一机房可以接管全部业务</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                    
                    <!-- Cross Region Active-Active -->
                    <div class="bg-white rounded-xl shadow-md overflow-hidden transition duration-300 card-hover">
                        <div class="p-6">
                            <div class="flex items-center mb-4">
                                <div class="bg-blue-100 p-3 rounded-full mr-4">
                                    <i class="fas fa-globe-asia text-blue-600"></i>
                                </div>
                                <h4 class="title-text text-lg font-bold">异地多活</h4>
                            </div>
                            <ul class="space-y-2 text-gray-700">
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                    <span>在不同城市部署多个RocketMQ集群</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                    <span>通过RocketMQ的消息复制功能实现跨地域数据同步</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-check text-green-500 mt-1 mr-2"></i>
                                    <span>支持区域级故障容灾</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
            
            <!-- Disaster Recovery Process -->
            <div class="bg-white rounded-xl shadow-md p-6 mb-8">
                <h3 class="title-text text-xl font-bold mb-4 flex items-center">
                    <i class="fas fa-project-diagram text-blue-500 mr-2"></i>
                    灾备切换流程
                </h3>
                <div class="mermaid">
                    graph LR
                        A[监控系统检测到故障] --> B[触发告警通知]
                        B --> C[自动/手动启动灾备流程]
                        C --> D[切换流量到备用集群]
                        D --> E[验证服务可用性]
                        E --> F[修复主集群]
                        F --> G[数据同步恢复]
                        G --> H[流量切回主集群]
                </div>
                <div class="mt-4 text-sm text-gray-500">
                    <i class="fas fa-info-circle mr-1"></i> 灾备切换流程应定期演练确保可靠性
                </div>
            </div>
        </section>

        <!-- Divider -->
        <div class="section-divider my-12"></div>

        <!-- Performance Optimization Section -->
        <section class="mb-20">
            <h2 class="title-text text-3xl font-bold mb-8 flex items-center">
                <span class="w-2 h-8 bg-blue-600 mr-4"></span>
                <span>性能优化和监控的实施建议</span>
            </h2>
            
            <!-- Performance Optimization -->
            <div class="mb-12">
                <h3 class="title-text text-2xl font-bold mb-6 flex items-center">
                    <i class="fas fa-tachometer-alt text-blue-500 mr-2"></i>
                    <span>性能优化</span>
                </h3>
                
                <div class="grid md:grid-cols-4 gap-6 mb-8">
                    <!-- Hardware -->
                    <div class="bg-white rounded-lg shadow-sm p-4 border border-gray-200">
                        <div class="flex items-center mb-3">
                            <div class="bg-blue-100 p-2 rounded-lg mr-3">
                                <i class="fas fa-microchip text-blue-600"></i>
                            </div>
                            <h4 class="title-text font-bold text-sm">硬件优化</h4>
                        </div>
                        <ul class="text-gray-700 text-xs space-y-1">
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>使用SSD存储CommitLog</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>配置足够的内存</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>使用高性能网卡</span>
                            </li>
                        </ul>
                    </div>
                    
                    <!-- Parameters -->
                    <div class="bg-white rounded-lg shadow-sm p-4 border border-gray-200">
                        <div class="flex items-center mb-3">
                            <div class="bg-blue-100 p-2 rounded-lg mr-3">
                                <i class="fas fa-sliders-h text-blue-600"></i>
                            </div>
                            <h4 class="title-text font-bold text-sm">参数调优</h4>
                        </div>
                        <ul class="text-gray-700 text-xs space-y-1">
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>调整发送线程池</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>优化拉取线程池</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>优化操作系统参数</span>
                            </li>
                        </ul>
                    </div>
                    
                    <!-- Architecture -->
                    <div class="bg-white rounded-lg shadow-sm p-4 border border-gray-200">
                        <div class="flex items-center mb-3">
                            <div class="bg-blue-100 p-2 rounded-lg mr-3">
                                <i class="fas fa-sitemap text-blue-600"></i>
                            </div>
                            <h4 class="title-text font-bold text-sm">架构优化</h4>
                        </div>
                        <ul class="text-gray-700 text-xs space-y-1">
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>合理规划Topic和队列</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>使用批量发送/消费</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>实现消息压缩</span>
                            </li>
                        </ul>
                    </div>
                    
                    <!-- Business -->
                    <div class="bg-white rounded-lg shadow-sm p-4 border border-gray-200">
                        <div class="flex items-center mb-3">
                            <div class="bg-blue-100 p-2 rounded-lg mr-3">
                                <i class="fas fa-chart-line text-blue-600"></i>
                            </div>
                            <h4 class="title-text font-bold text-sm">业务优化</h4>
                        </div>
                        <ul class="text-gray-700 text-xs space-y-1">
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>合理设计消息格式</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>优化消费者业务逻辑</span>
                            </li>
                            <li class="flex items-start">
                                <i class="fas fa-check text-green-500 mt-1 mr-2 text-xs"></i>
                                <span>实现消息过滤</span>
                            </li>
                        </ul>
                    </div>
                </div>
            </div>
            
            <!-- Monitoring -->
            <div>
                <h3 class="title-text text-2xl font-bold mb-6 flex items-center">
                    <i class="fas fa-chart-bar text-blue-500 mr-2"></i>
                    <span>监控实施</span>
                </h3>
                
                <div class="grid md:grid-cols-2 gap-8">
                    <!-- Left Column -->
                    <div>
                        <div class="bg-white rounded-xl shadow-md p-6 mb-6">
                            <h4 class="title-text text-lg font-bold mb-4">全面监控体系</h4>
                            <div class="space-y-4">
                                <div>
                                    <h5 class="font-medium text-gray-800 mb-2 flex items-center">
                                        <i class="fas fa-server text-blue-500 mr-2"></i>
                                        基础设施监控
                                    </h5>
                                    <p class="text-sm text-gray-700">服务器硬件、网络、操作系统等基础资源监控</p>
                                </div>
                                <div>
                                    <h5 class="font-medium text-gray-800 mb-2 flex items-center">
                                        <i class="fas fa-cubes text-blue-500 mr-2"></i>
                                        RocketMQ组件监控
                                    </h5>
                                    <p class="text-sm text-gray-700">NameServer、Broker、Producer、Consumer等组件监控</p>
                                </div>
                                <div>
                                    <h5 class="font-medium text-gray-800 mb-2 flex items-center">
                                        <i class="fas fa-chart-line text-blue-500 mr-2"></i>
                                        业务指标监控
                                    </h5>
                                    <p class="text-sm text-gray-700">消息量、延迟、成功率等关键业务指标监控</p>
                                </div>
                            </div>
                        </div>
                        
                        <div class="bg-white rounded-xl shadow-md p-6">
                            <h4 class="title-text text-lg font-bold mb-4">关键指标</h4>
                            <div class="grid grid-cols-2 gap-4">
                                <div class="bg-gray-50 p-3 rounded-lg">
                                    <div class="text-sm font-medium text-gray-600">消息堆积量</div>
                                    <div class="text-xs text-gray-500">反映消费能力</div>
                                </div>
                                <div class="bg-gray-50 p-3 rounded-lg">
                                    <div class="text-sm font-medium text-gray-600">消息延迟</div>
                                    <div class="text-xs text-gray-500">反映系统响应速度</div>
                                </div>
                                <div class="bg-gray-50 p-3 rounded-lg">
                                    <div class="text-sm font-medium text-gray-600">TPS/QPS</div>
                                    <div class="text-xs text-gray-500">反映系统处理能力</div>
                                </div>
                                <div class="bg-gray-50 p-3 rounded-lg">
                                    <div class="text-sm font-medium text-gray-600">磁盘使用率</div>
                                    <div class="text-xs text-gray-500">预防存储问题</div>
                                </div>
                            </div>
                        </div>
                    </div>
                    
                    <!-- Right Column -->
                    <div>
                        <div class="bg-white rounded-xl shadow-md p-6 mb-6">
                            <h4 class="title-text text-lg font-bold mb-4">监控工具</h4>
                            <div class="space-y-4">
                                <div class="flex items-start">
                                    <div class="bg-blue-100 p-2 rounded-lg mr-4">
                                        <i class="fas fa-tv text-blue-600"></i>
                                    </div>
                                    <div>
                                        <h5 class="font-medium text-gray-800">RocketMQ Dashboard</h5>
                                        <p class="text-sm text-gray-700">官方提供的监控面板，可查看基本运行状态</p>
                                    </div>
                                </div>
                                <div class="flex items-start">
                                    <div class="bg-blue-100 p-2 rounded-lg mr-4">
                                        <i class="fas fa-chart-pie text-blue-600"></i>
                                    </div>
                                    <div>
                                        <h5 class="font-medium text-gray-800">Prometheus + Grafana</h5>
                                        <p class="text-sm text-gray-700">构建可视化监控平台，支持自定义指标和告警</p>
                                    </div>
                                </div>
                                <div class="flex items-start">
                                    <div class="bg-blue-100 p-2 rounded-lg mr-4">
                                        <i class="fas fa-search text-blue-600"></i>
                                    </div>
                                    <div>
                                        <h5 class="font-medium text-gray-800">ELK/EFK</h5>
                                        <p class="text-sm text-gray-700">收集和分析日志，支持全文搜索和可视化</p>
                                    </div>
                                </div>
                            </div>
                        </div>
                        
                        <div class="bg-white rounded-xl shadow-md p-6">
                            <h4 class="title-text text-lg font-bold mb-4">告警机制</h4>
                            <ul class="space-y-3 text-gray-700">
                                <li class="flex items-start">
                                    <i class="fas fa-bell text-yellow-500 mt-1 mr-2"></i>
                                    <span>建立多级告警体系（警告、严重、紧急）</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-sliders-h text-yellow-500 mt-1 mr-2"></i>
                                    <span>设置合理的告警阈值（基于基线动态调整）</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-envelope text-yellow-500 mt-1 mr-2"></i>
                                    <span>实现多渠道告警通知（短信、邮件、IM等）</span>
                                </li>
                                <li class="flex items-start">
                                    <i class="fas fa-robot text-yellow-500 mt-1 mr-2"></i>
                                    <span>对告警进行分级处理（自动处理、人工介入）</span>
                                </li>
                            </ul>
                        </div>
                    </div>
                </div>
            </div>
        </section>

        <!-- Conclusion -->
        <section class="bg-blue-50 rounded-xl p-8 mb-12">
            <h2 class="title-text text-2xl font-bold mb-4 text-center">构建稳健的企业级消息系统</h2>
            <p class="text-gray-700 text-center mb-6">
                通过以上企业级部署架构、高可用容灾方案和性能优化监控措施，可以构建一个稳定、高效、可靠的RocketMQ商用消息系统，满足企业级应用的各种需求。
            </p>
            <div class="flex justify-center">
                <a href="#" class="px-6 py-2 bg-blue-600 text-white font-medium rounded-lg hover:bg-blue-700 transition duration-300 flex items-center">
                    <i class="fas fa-book mr-2"></i> 了解更多最佳实践
                </a>
            </div>
        </section>
    </div>

    <!-- Footer -->
    <footer class="bg-gray-900 text-gray-300 py-8">
        <div class="container mx-auto max-w-5xl px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="mb-4 md:mb-0">
                    <h3 class="text-lg font-medium">技术小馆</h3>
                    <p class="text-sm mt-1">构建可靠的技术基础设施</p>
                </div>
                <div>
                    <a href="http://www.yuque.com/jtostring" class="text-blue-400 hover:text-blue-300 transition duration-300 flex items-center">
                        <i class="fas fa-external-link-alt mr-2"></i> http://www.yuque.com/jtostring
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <!-- Scripts -->
    <script src="https://cdn.jsdelivr.net/npm/mermaid@latest/dist/mermaid.min.js"></script>
    <script>
        document.addEventListener('DOMContentLoaded', function() {
            mermaid.initialize({
                startOnLoad: true,
                theme: 'default',
                flowchart: {
                    useMaxWidth: true,
                    htmlLabels: true,
                    curve: 'basis'
                }
            });
            
            // 平滑滚动
            document.querySelectorAll('a[href^="#"]').forEach(anchor => {
                anchor.addEventListener('click', function (e) {
                    e.preventDefault();
                    document.querySelector(this.getAttribute('href')).scrollIntoView({
                        behavior: 'smooth'
                    });
                });
            });
            
            // 卡片悬停效果
            const cards = document.querySelectorAll('.card-hover');
            cards.forEach(card => {
                card.addEventListener('mouseenter', () => {
                    card.style.transition = 'transform 0.3s ease, box-shadow 0.3s ease';
                });
            });
        });
    </script>
</body>
</html>
```